home *** CD-ROM | disk | FTP | other *** search
- 8 pokev+33,1:q$=chr$(34):vt$="":dimvt$(25)
- 9 fori=.to25:vt$(i)=left$(vt$,i+1):next:vt$=""
- 10 r=53265:c=128:v=53248:s=v+1024:li=52016:wi=51200:cl=51203:su=51206:sd=51209
- 12 pokes+23,.:pokes+4,128
- 15 gosub1000:print" [215]elcome to this third installment"
- 16 print"of [204]oadstar's [195][207][205][193][204][160]0.14 [212]utorial. [201]n
- 17 [153]"the first installment, you entered and
- 18 print"ran a short [195][207][205][193][204][160]program to convert
- 19 [153]"degrees ascarenheit into degrees lenelsius
- 20 print"and in the second you learned how it
- 21 [153]"worked. (NULL)ow, we will learn some new
- 22 print"[195][207][205][193][204][160]commands that will let us store"
- 23 print"our programs onto our disk drives and"
- 24 print"recall them back into our [195]64's "
- 25 print"memory.":s%=-1:gosub1200
- 26 print" [215]e want to make sure our program is
- 27 [153]"just as we left it. (NULL)right$(NULL)(NULL)closethe program
- 28 print"to be sure it is still there:
- 30 [141]1160:[141]1300:x%[178].:y%[178]16:a$[178]"(NULL)right$(NULL)(NULL)":[141]1600
- 31 [139]e[167]a$[178][202](a$,e):e[178].:[141]1605:[137]31
- 32 x%[178]4:y%[178]16:[141]1500:[139]k$[179][177][199](13)[167]32
- 33 [153]:[153]"0010 right$(NULL)(NULL)(NULL)(NULL) "q$"str$valchr$(NULL)valval(NULL) asc? "q$": ascatn(NULL)val(NULL)left$valright$(NULL)
- 34 print"0020 [195][197][204][211][201][213][211]:=([198][193][210][197][206][200][197][201][212]-32)*(5/9)
- 35 [153]"0030 (NULL)(NULL)right$(NULL)(NULL) ascatn(NULL)val(NULL)left$valright$(NULL);"q$"asc ="q$";lenval(NULL)(NULL)right$(NULL)(NULL);"q$"len"q$"":[141]1035
- 36 [141]1150:[153]"stop (NULL)ep, still there! mid$ust for "
- 37 [153]"practice, (NULL)(NULL)(NULL)closethe program and find out"
- 38 [153]"how many degrees lenelsius 100 degrees "
- 39 [153]"ascarenheit converts into:
- 40 gosub1160:x%=.:y%=21:a$="[210][213][206]":gosub1600
- 41 ifethena$=mid$(a$,e):e=.:gosub1605:goto41
- 42 x%=3:y%=21:gosub1500:ifk$<>chr$(13)then42
- 43 print:print"[196][197][199][210][197][197][211] [198]? ";:
- 45 x%=11:y%=22:a$="100":gosub1600
- 46 ifethena$=mid$(a$,e):e=.:gosub1605:goto46
- 47 x%=14:y%=22
- 48 gosub1500:ifk$<>chr$(13)then48
- 49 print:print"100 [198] = 37.7777778 [195]":gosub1700:print"[197][206][196][160][193][212][160]0030";:gosub1700:gosub1700
- 50 gosub1035:gosub1150:print"[144][146] [217]ep! [201]t's been getting around
- 51 [153]"37.7777778 len down here in (NULL)ousiana.":[141]1205
- 55 [153]" (NULL)ow right$'m sure you have turned your
- 56 print"computer off a time or two since we
- 57 [153]"'wrote' this program 2 months ago! right$n
- 58 print"real life, our program would be gone
- 59 [153]"since turning off the computer erases
- 60 print"it's memory!
- 61 [153]" (NULL)e need a way to keep our programs,
- 62 print"even when we turn our computer off.
- 63 [153]"(NULL)hat, of course, is why you spent a
- 64 print"couple of hundred dollars or so on
- 65 [153]"that disk drive you've got!":[141]1200
- 70 :
- 71 :
- 72 :
- 73 :
- 74 :
- 75 :
- 76 :
- 77 :
- 78 :
- 79 :
- 80 [153]" ascirst off, you need to know a few
- 81 print"things. [193] single floppy disk can hold
- 82 [153]"144 'files' or 168,656 'bytes' of "
- 83 [153]"data, whichever comes first. atn 'byte'
- 84 print"is equivalent to a character: i.e. a
- 85 [153]"letter, digit, symbol, etc. atn 'file'
- 86 print"is a set of bytes grouped together and
- 87 [153]"given a name. atn file can be a peekatn(NULL)right$len,
- 88 print"[195][207][205][193][204][160]or [205]achine [204]anguage program, or
- 89 [153]"a graphics picture, a set of sprite
- 90 print"shapes, a list of names and phone "
- 91 print"numbers, or any other set of data.":gosub1200
- 95 print" [194]efore a disk can be used to hold
- 96 [153]"files, it must be 'formatted'. (NULL)his
- 97 print"usually only needs to be done once.
- 98 [153]"atnmong other things, the formatting
- 99 print"process gives the disk a 'name' and an
- 100 [153]"'right$.str$.'. (NULL)he right$.str$. is two characters,
- 101 print"cannot contain a ,[146] or =[146], and must
- 102 [153]"be different for each disk you own.
- 103 print"[212]he disk name (and file names, too)
- 104 [153]"may be up to 16 characters long with
- 105 print"no ,[146], =[146], ?[146], or *[146], and may not
- 106 [153]"begin with a #wait or a $wait!":[141]1200
- 110 [153]" ascormatting a disk is accomplished
- 111 print"by the disk drive itself, not the [195]64!
- 112 [153]"right$n other words, you simply (NULL)atn(NULL)(NULL) a "
- 113 [153]"command to the disk drive, and it does
- 114 print"the work! [201]n [194][193][211][201][195], this is a tedious
- 115 [153]"and involved process. right$n len(NULL)(NULL)atn(NULL), the
- 116 print"[208][193][211][211] statement makes it easy! [202]ust
- 117 [153]"think of (NULL)atn(NULL)(NULL) as a (NULL)(NULL)right$(NULL)(NULL) to the disk
- 118 print"drive's 'command channel'. [193]ny disk
- 119 [153]"drive command can be (NULL)atn(NULL)(NULL)ed!
- 120 :
- 121 gosub1200
- 125 print" [217]our disk drive's manual tells you
- 126 [153]"that to format a disk, the 'command
- 127 print"channel' must be given a [206][197][215] command.
- 128 [153]"(NULL)ike all disk drive 'command channel'
- 129 print"commands, this one begins with a "
- 130 print"single letter (in this case, [206] for"
- 131 print"[206][197][215]), followed by an optional drive"
- 132 print"number (either none or 0 unless you"
- 133 print"have a dual-drive unit), plus a :[146],"
- 134 print"followed by parameters. [212]he "
- 135 print"parameters for the [206][197][215] command are"
- 136 print"the [206][193][205][197] and [201][196] for the new disk.":gosub1200
- 140 print" [211]o, a [206][197][215][160]command to give our disk
- 141 [153]"the name 'len(NULL)(NULL)atn(NULL)close(NULL)(NULL)(NULL)chr$(NULL)atn(NULL)(NULL)#1' and an right$str$"
- 142 [153]"of 'len1', would be:"
- 143 [153]" '(NULL)0:len(NULL)(NULL)atn(NULL)close(NULL)(NULL)(NULL)chr$(NULL)atn(NULL)(NULL)#1,len1'.
- 144 :
- 145 :
- 146 :
- 147 :
- 148 print" [211]o how do we get this command to
- 149 [153]"the disk drive's 'command channel'?
- 150 print"[215]ith [195][207][205][193][204]'s [208][193][211][211] statement!":gosub1200
- 155 print" [215]e simply type '[208][193][211][211]', followed by
- 156 [153]"the command enclosed within double-
- 157 print"quotes. [206]ow type:"
- 158 print" [208][193][211][211] "q$"[206]0:[195][207][205][193][204][160][208][210][207][199][210][193][205][211]#1,[195]1"q$"
- 159 [153]" (str$on't worry..we're (NULL)(NULL)(NULL) going to ":[153]" (NULL)val(NULL)closeyour disk!)
- 160 gosub1160:gosub1300:x%=.:y%=24:a$="[208][193][211][211] "+q$+"[206]0:[195][207][205][193][204] [208][210][207][199][210][193][205][211]#1,[195]1"+q$:gosub1600
- 161 ifethena$=mid$(a$,e):e=.:gosub1605:goto161
- 162 x%=29:y%=24:gosub1500:ifk$<>chr$(13)then162
- 163 gosub1700:gosub1700
- 165 gosub1035:gosub1150:gosub1220:print"[144][146][196]one! [206]ow check status by typing:"
- 166 print" [211][212][193][212][213][211]
- 170 [141]1160:x%[178].:y%[178]24:a$[178]"(NULL)(NULL)atn(NULL)(NULL)(NULL)":[141]1600
- 171 [139]e[167]a$[178][202](a$,e):e[178].:[141]1605:[137]171
- 172 x%[178]6:y%[178]24:[141]1500:[139]k$[179][177][199](13)[167]172
- 173 [141]1700:[153]"00, (NULL)(NULL),00,00";:[141]1700:[141]1700
- 175 [141]1035:[141]1150:[153]"stopwait(NULL)ure looks '(NULL)(NULL)' to me!":[141]1205
- 180 [153]" atnfter formatting a disk, we need"
- 181 [153]"not do so again. (NULL)e can save up to"
- 182 [153]"144 programs on it!"
- 183 :
- 184 [153]" (NULL)o save the current len(NULL)(NULL)atn(NULL) program
- 185 print"in memory as a disk file, use [195][207][205][193][204]'s
- 186 [153]"'(NULL)atn(NULL)val' command. (NULL)e simply type '(NULL)atn(NULL)val'
- 187 print"followed by our desired file name "
- 188 print"enclosed in double-quotes! [210]emember,"
- 189 print"a file name, like a disk name, may be"
- 190 print"up to 16 characters long.":gosub1200
- 195 print" [211]ince file names may not contain"
- 196 print"a ,[146], =[146], ?[146], or *[146], and may not"
- 197 print"begin with a #[146] or $[146], let's call"
- 198 print"our program '[195].[195][197][204][211][201][213][211] #1'. [212]o save"
- 199 print"it under our chosen name, type:"
- 200 print" [211][193][214][197] "q$"[195].[195][197][204][211][201][213][211] #1"q$"
- 205 [141]1160:[141]1300:x%[178].:y%[178]24:a$[178]"(NULL)atn(NULL)val "[170]q$[170]"len.lenval(NULL)(NULL)right$(NULL)(NULL) #1"[170]q$:[141]1600
- 206 [139]e[167]a$[178][202](a$,e):e[178].:[141]1605:[137]206
- 207 x%[178]19:y%[178]24:[141]1500:[139]k$[179][177][199](13)[167]207
- 208 [141]1700:[141]1700:[159]8,8,8,"c.celsius #1,p,w"
- 209 [135]d%:[139]d%[177][178]0[167][152]8,[199](d%);:[137]209
- 210 [160]8:[141]1035:[141]1150:[153]"waitstop (NULL)here! (NULL)ow that our program has
- 211 print"been placed safely on our disk, let's
- 212 [153]"clear out len(NULL)(NULL)atn(NULL)'s program memory (i.e.
- 213 print"erase our program from memory).":gosub1205
- 215 print" [212]o do this, we need to use [195][207][205][193][204]'s
- 216 [153]"'(NULL)val(NULL)' command (not to be confused with
- 217 print"the disk drive's '[206][197][215]'). [212]he [195][207][205][193][204]
- 218 [153]"'(NULL)val(NULL)' command erases the program in":[153]"memory. right$t does (NULL)(NULL)(NULL)";
- 219 [153]"affect the diskdrive.":[153]" atnfter a '(NULL)val(NULL)',";
- 220 [153]"there is no len(NULL)(NULL)atn(NULL)":[153]"program in memory.
- 221 print"[204]et's try it. [212]ype:
- 222 [153]" (NULL)val(NULL)"
- 225 [141]1160:[141]1300:x%[178].:y%[178]24:a$[178]"(NULL)val(NULL)":[141]1600
- 226 [139]e[167]a$[178][202](a$,e):e[178].:[141]1605:[137]226
- 227 x%[178]3:y%[178]24:[141]1500:[139]k$[179][177][199](13)[167]227
- 228 [141]1700:[141]1700:[141]1035:[141]1150:[158]wi
- 229 [153]"stopwait(NULL)kay, program memory is now cleared."
- 230 [153]"(NULL)et's be sure. (NULL)ry the (NULL)right$(NULL)(NULL) command:"
- 231 :
- 235 [141]1160:[141]1300:x%[178].:y%[178]24:a$[178]"(NULL)right$(NULL)(NULL)":[141]1600
- 236 [139]e[167]a$[178][202](a$,e):e[178].:[141]1605:[137]236
- 237 x%[178]4:y%[178]24:[141]1500:[139]k$[179][177][199](13)[167]237
- 238 [141]1700:[141]1700:[141]1035:[141]1150
- 240 [153]"stopwait left$mmm... not much there, is there?
- 241 print"[206]ow try to [210][213][206][160]our program:
- 245 [141]1160:x%[178].:y%[178]24:a$[178]"(NULL)(NULL)(NULL)":[141]1600
- 246 [139]e[167]a$[178][202](a$,e):e[178].:[141]1605:[137]246
- 247 x%[178]3:y%[178]24:[141]1500:[139]k$[179][177][199](13)[167]247
- 248 [141]1700:[141]1700:[141]1035:[141]1150
- 250 [153]"stopwait (NULL)till nothing! right$ guess our program
- 251 print"is gone forever!
- 252 [153]" str$on't panic! (NULL)here is (NULL)(NULL)right$(NULL)(NULL) our
- 253 print"trusty little disk drive. [194]ut how do
- 254 [153]"we get a program from it into len(NULL)(NULL)atn(NULL)?":[141]1205
- 255 [153]" ascirst, let's check the contents of
- 256 print"the disk. [197]ach disk has a list of the
- 257 [153]"files that are on it, which it keeps
- 258 print"in a special part of the disk called
- 259 [153]"the 'catalog' (or 'directory'). (NULL)o
- 260 print"see it, use the '[195][193][212]' command:
- 261 [141]1160:[141]1300:x%[178].:y%[178]24:a$[178]"lenatn(NULL)":[141]1600
- 262 [139]e[167]a$[178][202](a$,e):e[178].:[141]1605:[137]262
- 263 x%[178]3:y%[178]24:[141]1500:[139]k$[179][177][199](13)[167]263
- 264 [159]15,8,15:[159]8,8,8,"#":[152]15,"u1:8 0 18 0":[141]1700:[153]"on
- 265 print" 0 [146]"q$"[195][207][205][193][204][160][208][210][207][199][210][193][205][211]#1"q$" [195]1 2[193]";:gosub1700:print"[145]
- 266 [152]15,"ua:8 0 18 1"
- 267 [153]" 1 "q$"len.lenval(NULL)(NULL)right$(NULL)(NULL)close#1"q$" (NULL)(NULL)chr$";:[141]1700:[153]"on
- 268 print" 663 blocks free.";:gosub1700:gosub1700
- 269 close8:close15:gosub1035:gosub1150
- 271 print"[144][146] [212]he top line (in [210][197][214][197][210][211][197][146]) tells us
- 272 [153]"that the catalog is from the disk in
- 273 print"drive #0 (the 1541 only has 1 drive!),
- 274 [153]"called 'len(NULL)(NULL)atn(NULL)close(NULL)(NULL)(NULL)chr$(NULL)atn(NULL)(NULL)#1' with an right$str$
- 275 print"of '[195]1'. [211]ound familiar?":gosub1205
- 276 print" [196]on't worry about the '2[193]'. [201]t
- 277 [153]"simply means that the disk is in 1541-
- 278 print"compatible format. [212]he next line is
- 279 [153]"even more interesting! right$t tells us we
- 280 print"have a 1 'block' file by the name of
- 281 [153]"'len.lenval(NULL)(NULL)right$(NULL)(NULL)close#1', and that said file is
- 282 print"a [208][210]o[199]ram! [206]ow you know why [201] had us
- 283 [153]"start our file name with 'len.'. (NULL)here
- 284 print"is no way to tell from the catalog "
- 285 print"alone whether a [208][210][199] is [194][193][211][201][195], machine-
- 286 [153]"language or len(NULL)(NULL)atn(NULL)!":[141]1200
- 290 [153]" (NULL)he last line tells us that we
- 291 print"still have 663 'blocks' left on the
- 292 [153]"disk. atn 'block'closeis simply the "
- 293 [153]"smallest 'chunk' of space that can be"
- 294 [153]"allocated by the disk drive. atn block
- 295 print"holds just over 250 bytes. [207]ur "
- 296 print"program, being quite small, took up"
- 297 print"only one block!
- 298 [153]" (NULL)kay, we know our program is on the
- 299 print"disk. [200]ow do we load it back into the
- 300 [153]"64's memory? (NULL)ith the '(NULL)(NULL)atnstr$' command!":[141]1200
- 301 [153]" len(NULL)(NULL)atn(NULL)'s '(NULL)(NULL)atnstr$' command is similar
- 302 print"to the related [211][193][214][197] command. [207]ne "
- 303 print"simply types '[204][207][193][196]' followed by the "
- 304 print"file name of the program to [204][207][193][196] "
- 305 print"enclosed in double-quotes. [217]ou try"
- 306 print"it. [212]ype:
- 307 [153]" (NULL)(NULL)atnstr$ "q$"len.lenval(NULL)(NULL)right$(NULL)(NULL) #1"q$"
- 310 gosub1160:gosub1300:x%=.:y%=24:a$="[204][207][193][196] "+q$+"[195].[195][197][204][211][201][213][211] #1"+q$:gosub1600
- 311 ifethena$=mid$(a$,e):e=.:gosub1605:goto311
- 312 x%=19:y%=24:gosub1500:ifk$<>chr$(13)then312
- 313 gosub1700:gosub1700:open8,8,.,"c.celsius #1"
- 314 get#8,a$:ifst=.then314
- 315 close8:gosub1035:gosub1150:print"[144][146][199]ood! [206]ow [204][201][211][212][160]it:
- 320 [141]1160:x%[178].:y%[178]24:a$[178]"(NULL)right$(NULL)(NULL)":[141]1600
- 321 [139]e[167]a$[178][202](a$,e):e[178].:[141]1605:[137]321
- 322 x%[178]4:y%[178]24:[141]1500:[139]k$[179][177][199](13)[167]322
- 323 [141]1700:[153]"0010 right$(NULL)(NULL)(NULL)(NULL) "q$"str$valchr$(NULL)valval(NULL) asc? "q$": ascatn(NULL)val(NULL)left$valright$(NULL)";:[141]1700:[153]"on
- 324 print"0020 [195][197][204][211][201][213][211]:=([198][193][210][197][206][200][197][201][212]-32)*(5/9)";:gosub1700:print"[145]
- 325 [153]"0030 (NULL)(NULL)right$(NULL)(NULL) ascatn(NULL)val(NULL)left$valright$(NULL);"q$"asc ="q$";lenval(NULL)(NULL)right$(NULL)(NULL);"q$"len"q$;:[141]1700:[141]1700
- 326 [141]1035:[141]1150:[153]"stopwait(NULL)eems to be all there!":[141]1205
- 330 [153]" (NULL)(NULL)(NULL) it once to make sure. left$ave it
- 331 print"convert 32 degrees [198]arenheit to "
- 332 print"degrees [195]elsius:"
- 335 gosub1160:gosub1300:x%=.:y%=24:a$="[210][213][206]":gosub1600
- 336 ifethena$=mid$(a$,e):e=.:gosub1605:goto336
- 337 x%=3:y%=24:gosub1500:ifk$<>chr$(13)then337
- 338 gosub1700:print"[145]":print"[196][197][199][210][197][197][211] [198]? ";:
- 339 x%=11:y%=24:a$="32":gosub1600
- 340 ifethena$=mid$(a$,e):e=.:gosub1605:goto340
- 341 x%=13:y%=24
- 342 gosub1500:ifk$<>chr$(13)then342
- 343 gosub1700:print"32 [198] = 0 [195][145]";:gosub1700
- 344 gosub1700:print"[197][206][196][160][193][212][160]0030";:gosub1700:gosub1700
- 345 gosub1035:gosub1150:print"[144][146][211]o water freezes at 0 [195] (32 [198])!
- 346 [153]" (NULL)e have learned quite a lot of very
- 347 print"important stuff today!
- 348 [153]" 1. left$ow to (NULL)atn(NULL)(NULL) a (NULL)val(NULL) command to
- 349 print"disk drive in order to format a [206][197][215]
- 350 [153]"disk, giving it a name and right$str$.":[141]1205
- 351 [153]" 2. left$ow to (NULL)atn(NULL)val a len(NULL)(NULL)atn(NULL) program to
- 352 print"the disk a file, by file name.
- 354 [153]" 3. left$ow to clear out len(NULL)(NULL)atn(NULL) memory,
- 355 print"in preparation for typing in a '[206][197][215]'
- 356 [153]"program.
- 357 print" 4. [200]ow to display and understand
- 358 [153]"the lenatn(NULL)alog of a disk.
- 359 print" 5. [200]ow to [204][207][193][196] a previously-[211][193][214][197]d
- 360 [153]"program into memory from disk.":[141]1200
- 361 [153]" (NULL)ell, it's that time again. (NULL)ime
- 362 print"for a short quiz to check up on "
- 363 print"concepts taught this lesson. [193]s "
- 364 print"usual the questions are either true-"
- 365 print"false or multiple-choice. [217]our "
- 366 print"possible answers will be hilighted in"
- 367 print"reverse[146]. [202]ust press the correct key.":gosub1200
- 370 print"1. [194]efore you can use a new, blank
- 371 [153]"disk, you must first:
- 372 print" [193] [146] [201]nitialize it,
- 373 [153]" peek wait ascormat it,
- 374 print" [195] [146] [206]ame and [201][196] it, or
- 375 [153]" str$ wait peekoth peek and len.
- 376 gosub1300:a$="[196]":w1$="[193]":w2$="[194]":w3$="[195]":gosub1800
- 377 print"[193] new disk must be"
- 378 print"formatted and given a name and [201][196].":gosub1205
- 380 print"2. [212]o format a new disk and give it
- 381 [153]"a name and right$str$ from len(NULL)(NULL)atn(NULL), type:
- 382 print" [193] [146] [207][208][197][206] 15,8,15,"q$"[206]0:diskname,id"q$
- 383 print" [194] [146] [208][193][211][211] "q$"[206]0:diskname,id"q$
- 384 print" [195] [146] [198][207][210][205][193][212] 0,"q$"diskname"q$","q$"id"q$
- 385 print" [196] [146] [206]one of the above.
- 386 [141]1300:a$[178]"peek":w2$[178]"str$":[141]1800:[153]"len(NULL)(NULL)atn(NULL)'s '(NULL)atn(NULL)(NULL)' statement
- 387 print"is used to pass [206]<ew>, or any other
- 388 [153]"disk drive command to the drive.":[141]1205
- 390 [153]"3. atn disk usually needs to be (NULL)val(NULL)ed
- 391 print"only once. [212]he [195][207][205][193][204] program in "
- 392 print"memory can be written to a disk with"
- 393 print"sufficient room by using:
- 394 [153]" atn wait the '(NULL)atn(NULL)val'closecommand,
- 395 print" [194] [146] the '[215][210][201][212][197]' command,
- 396 [153]" len wait the '(NULL)(NULL)(NULL)(NULL)val' command, or
- 397 print" [196] [146] the '[212][193][203][197][160][212][200][193][212]!' command.
- 398 [141]1300:a$[178]"atn":w1$[178]"peek":[141]1800:[153]"(NULL)he '(NULL)atn(NULL)val' command writes,
- 399 print"or saves, a [195][207][205][193][204] program.":gosub1205
- 400 print"4. [212]o clear the [195][207][205][193][204][160]program memory
- 401 [153]"space, use:
- 402 print" [193] [146] the '[195][204][197][193][210]' command.
- 403 [153]" peek wait the 'val(NULL)atn(NULL)val'closecommand.
- 404 print" [195] [146] the '[206][197][215]' command, or
- 405 [153]" str$ wait the 'lenatn(NULL)' command.
- 406 gosub1300:a$="[195]":w3$="[193]":gosub1800:print"[212]he [206][197][215][160]command clears the
- 407 [153]"len(NULL)(NULL)atn(NULL)closeprogram space, usually so you
- 408 print"can start typing in a [206][197][215] program.":gosub1205
- 410 print"5. [212]o find out what is on a disk,
- 411 [153]"just use:
- 412 print" [193] [146] the '[204][201][211][212]' command,
- 413 [153]" peekclosewait the '(NULL)atn(NULL)(NULL)close"q$"$"q$"' command,
- 414 print" [195] [146] the '[206][197][215]' command, or
- 415 [153]" str$ wait the 'lenatn(NULL)' command.
- 416 gosub1300:a$="[196]":w2$="[195]":gosub1800:print"[212]o see what is on the disk
- 417 [153]"you have to look at its lenatn(NULL)alog. (NULL)he
- 418 print"[195][207][205][193][204][160]'[195][193][212]' command displays said "
- 419 print"[195][193][212]alog.":gosub1205
- 420 print"6. [212]o retrieve a [195][207][205][193][204] program that
- 421 [153]"was (NULL)atn(NULL)vald to disk, use:
- 422 print" [193] [146] the '[197][206][212][197][210]' command,
- 423 [153]" peek wait the '(NULL)(NULL)str$'closecommand,
- 424 print" [195] [146] the '[204][207][193][196]' command, or
- 425 [153]" str$ wait the 'chr$val(NULL)closeright$(NULL)closeleft$val(NULL)val!' command.
- 426 gosub1300:a$="[195]":w2$="[196]":gosub1800:print"[217]ou [204][207][193][196] a program into
- 427 [153]"memory that was (NULL)atn(NULL)vald to disk!":[141]1205
- 430 [153]"7. (NULL)hich of the following is a legal
- 431 print"file name?
- 432 [153]" atn wait 'len.(NULL)left$atn(NULL)closeatnclose(NULL)(NULL)(NULL)chr$(NULL)atn(NULL)!'
- 433 print" [194] [146] '[195][207][205][193][204][160][208][210][199][160]#1'
- 434 [153]" len wait '#1 len(NULL)(NULL)atn(NULL)close(NULL)(NULL)chr$'
- 435 print" [196][160][146] '[195][207][205][193][204][160][208][210][199], [206][207]. 1'
- 436 [141]1300:a$[178]"peek":w1$[178]"len":[141]1800:[153]"(NULL)emember, a file name can
- 437 print"[206][207][212][160]have more than 16 characters (like
- 438 [153]"atn), start with '#' or '$'close(like len) nor
- 439 print"contain ,[146], =[146], ?[146], or *[146] (like [196]).
- 440 [141]1205
- 445 [153]"8. '* len(NULL)(NULL)atn(NULL)close(NULL)(NULL)(NULL)ascascclose*' is a legal disk
- 446 print"name, but an illegal file name.
- 447 [153]" (NULL) waitrue or asc waitalse?
- 448 gosub1300:a$="[212]":w1$="[198]":w2$="[198]":w3$="[198]":gosub1800
- 449 print"[212]he characters ?[146] and *[146]
- 450 [153]"are okay in disk names, but illegal in
- 451 print"file names.":gosub1205
- 455 print"9. [201]t is in your best interests to
- 456 [153]"give each disk you format the same right$str$.
- 457 print" [212] [146]rue or [198] [146]alse
- 458 [141]1300:a$[178]"asc":w1$[178]"(NULL)":w2$[178]"(NULL)":w3$[178]"(NULL)":[141]1800
- 459 [153]"(NULL)he right$str$closeis what the drive
- 460 print"uses to see if you have the same disk
- 461 [153]"in the drive before (NULL)atn(NULL)valing or other
- 462 print"writing. [201]f two [201][196]'s are the same,
- 463 [153]"the drive might write over space that
- 464 print"was free on the [207][212][200][197][210] disk!":gosub1205
- 465 print"10. [212]he '[195].' of '[195].[195][197][204][211][201][213][211][160]#1', our
- 466 [153]"program's file name, tells the drive
- 467 print"that it is a [195][207][205][193][204] program.
- 468 [153]" (NULL)closewaitrue or asc waitalse?
- 469 gosub1300:gosub1800:print"[201]t tells [213][211][160]that it is a
- 470 [153]"len(NULL)(NULL)atn(NULL) program, when we read the"
- 471 [153]"lenatn(NULL)alog. (NULL)he disk drive doesn't need"
- 472 [153]"to know!":[141]1205
- 550 [153]" (NULL)hat is all for this issue. (NULL)f the
- 551 print"10 questions in our little quiz, you
- 552 [153]"answered"sc%"correctly.
- 553 ifsc%<10then560
- 554 print" [201][160]know a perfect score when [201] see
- 555 [153]"one! (NULL)ou are definitely ready for
- 556 print"next issue's lesson!":goto600
- 560 ifsc%<7then570
- 561 print" [217]ou did rather well! [201] suggest you
- 562 [153]"obtain a copy of len(NULL)(NULL)atn(NULL) 0.14 (if you
- 563 print"do not have one already) and practice
- 564 [153]"the concepts taught this lesson. (NULL)ou
- 565 print"will then be ready for next issue's
- 566 [153]"lesson.":[137]600
- 570 [153]" (NULL)ou do not seem to have caught on
- 571 print"to many of the concepts presented this
- 572 [153]"lesson. (NULL)e-take this tutorial, then":[137]562
- 600 [153]vt$(15)"clr (NULL)ress space bar to return to (NULL)oadstar! ":[141]1300:[151]198,.:[146]198,1
- 601 [151]198,.:[141]1400:[151]v[170]33,.:[153]"loadstopload"q$"hello"q$",8":[153]"run"
- 605 [151]631,13:[151]632,13:[151]198,2
- 999 [128]:
- 1000 [151]v[170]33,1:[153]"load len(NULL)(NULL)atn(NULL)close0.14 (NULL)utorial right$nstallment #3"
- 1005 [153]"stoportantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantan^";:[129]i[178]1[164]12
- 1010 [153]"(NULL) (NULL)";:[130]:
- 1015 [153]"/tantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantanexp
- 1020 printvtab$(14):fori=1to9:print" ";
- 1025 next:gosub1050
- 1030 fori=217to242:pokei,peek(i)or128:next:
- 1035 poke1020,2:poke1021,13:poke1022,1:poke1023,38:return:
- 1050 printvt$(24)" [146]";
- 1055 poke2023,160:poke56295,6:return:
- 1100 gosub1160
- 1110 printvt$(y%-1):printtab(x%);:return:
- 1150 x%=sx%:y%=sy%:goto1110
- 1160 sx%=peek(211):sy%=peek(214):return:
- 1200 gosub1300
- 1205 printvt$(14):printtab(3)"[129] [208]ress space bar for next page. "
- 1210 poke198,.:wait198,1:poke198,.
- 1215 printvt$(14):printtab(3)" "
- 1220 goto1400
- 1300 poke646,15:waitr,c:waitr,c:syscl:poke646,12:waitr,c:waitr,c:syscl
- 1305 poke646,11:waitr,c:waitr,c:syscl:poke646,.:waitr,c:waitr,c:syscl:return:
- 1400 poke646,11:waitr,c:waitr,c:syscl:poke646,12:waitr,c:waitr,c:syscl
- 1405 poke646,15:waitr,c:waitr,c:syscl:waitr,c:waitr,c:syswi:return:
- 1500 gosub1110:f%=-1:l%=peek(209)+256*peek(210)+peek(211):c%=peek(l%)
- 1505 pokel%,-f%*(peek(l%)and127)-(notf%)*(peek(l%)or128):f%=notf%
- 1510 forf=1to48:getk$:ifk$=""thennext:goto1505
- 1512 ifk$="[160]"thenk$=" ":rem shift-space to space!
- 1515 f=256:next:pokel%,c%:ifk$>"@"andk$<"["thenk$=chr$(asc(k$)+128)
- 1520 return:
- 1600 ax%=x%:ay%=y%
- 1605 fora=1tolen(a$)
- 1606 gosub1500:ifk$=mid$(a$,a,1)thenprint""k$;:poke212,.:poke216,.:x%=x%+1:next:return:
- 1607 ifk$=chr$(13)then1606
- 1610 e=a:e$=mid$(a$,e,1):a=256:next:
- 1615 print"";:poke212,1:poke216,1:printk$;:poke212,.:poke216,.:gosub1150
- 1620 pokev+32,2:print"[207][207][208][211]! [217]ou missed the [150] "e$" key!":gosub1900:gosub1150
- 1625 pokev+32,5:print"[206]ow press the [153] [201][206][211][212]-[196][197][204] key once: ":x%=ax%+e:y%=ay%
- 1630 gosub1500:ifk$<>""then1630
- 1635 gosub1150:pokev+32,14:print"[154][206]ow finish typing![146] "
- 1640 ax%=ax%+e-1:x%=ax%:y%=ay%:return:
- 1700 poke1020,16:poke1021,24:poke1022,.:poke1023,39
- 1705 syssu:gosub1050:x%=.:y%=24:goto1110:
- 1800 gosub1160
- 1805 x%=.:y%=24:gosub1500:ifk$<>a$andk$<>w1$andk$<>w2$andk$<>w3$then1805
- 1810 gosub1035:gosub1150:print:
- 1815 ifk$=a$thenprint" [195][207][210][210][197][195][212]! [146][144] ";:sc%=sc%+1:return:
- 1820 print" [211]orry. [146][144] ";:return:
- 1900 forp=1to2048:next:return:
- 9000 data69,,79,,98,,,10,22,181,3,11,68,69,71,82,69,69,83,32,70,63,32,183,7,1
- 9005 data184,187,,20,22,7,2,4,1,2,,32,41,71,2,,5,2,,9,35,71,36,58,,30,25,95,4,1
- 9010 data100,103,3,3,70,32,61,101,103,4,2,100,103,3,1,67,101,96,97,16,252,175,,
- 9015 data16,247,175,,,9,70,65,82,69,78,72,69,73,84,7,67,69,76,83,73,85,83,,,-1
-